package com.ml.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 和泛微公用的数据库  hrmresource
 * 用户实体类，该实体只做查询操作，不做更新和删除操作， 在servece中设置 @Transactional(readOnly=true)
 * */

@Entity
@Table(name = "hrmresource", schema = "")
public class MLUser implements Serializable {

    //这是此注解后该属性不会数据持久化也是本例要说明的注解
    //@Transient

    private Integer id ;

    /**登陆账号*/
    private String loginid;
    /**密码*/
    private String password;

    /**真实名字*/
    private String lastname;

    /**性别*/
    private String sex;

    /**部门ID*/
    private String departmentid;

    /**岗位ID*/
    private String jobtitle;

    /**分部ID*/
    private Integer locationid;

    /**直接上级ID*/
    private String managerid;

    /**工号*/
    private String workcode;

    /**状态 0：试用
     1：正式
     2：临时
     3：试用延期
     4：解聘
     5：离职
     6：退休
     7：无效
     */
    private Integer status;


    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name = "LOGINID", nullable = true,insertable=false,updatable = false)
    public String getLoginid() {
        return loginid;
    }

    public void setLoginid(String loginid) {
        this.loginid = loginid;
    }

    @Column(name = "password", nullable = true,insertable=false,updatable = false)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "LASTNAME", nullable = true,insertable=false,updatable = false)
    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    @Column(name = "SEX", nullable = true,insertable=false,updatable = false)
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Column(name = "DEPARTMENTID", nullable = true,insertable=false,updatable = false)
    public String getDepartmentid() {
        return departmentid;
    }

    public void setDepartmentid(String departmentid) {
        this.departmentid = departmentid;
    }

    @Column(name = "JOBTITLE", nullable = true,insertable=false,updatable = false)
    public String getJobtitle() {
        return jobtitle;
    }

    public void setJobtitle(String jobtitle) {
        this.jobtitle = jobtitle;
    }

    @Column(name = "LOCATIONID", nullable = true,insertable=false,updatable = false)
    public Integer getLocationid() {
        return locationid;
    }

    public void setLocationid(Integer locationid) {
        this.locationid = locationid;
    }

    @Column(name = "MANAGERID", nullable = true,insertable=false,updatable = false)
    public String getManagerid() {
        return managerid;
    }

    public void setManagerid(String managerid) {
        this.managerid = managerid;
    }

    @Column(name = "WORKCODE", nullable = true,insertable=false,updatable = false)
    public String getWorkcode() {
        return workcode;
    }

    public void setWorkcode(String workcode) {
        this.workcode = workcode;
    }

    @Column(name = "STATUS", nullable = true,insertable=false,updatable = false)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
